/*********************************************
 * Copyright (c) 2009 ICBC.
 * All rights reserved.
 * Created on 2009-4-6 04:17:06
 * 
 * Contributors:
 *     ctp - initial implementation
 *********************************************/
package com.icbc.ctpdemo.menumgmt;
/**
 * 菜单管理类.
 * 
 * <pre>
 *  用于菜单新增、菜单修改、菜单列表查询交易
 * </pre>
 * 
 * @author kfzx-yuanjx1
 * 
 */
public class MenuBean {
	private String menuPos;//菜单节点位置，表树组件需要
	private String menuId;//菜单节点id并接，表树组件需要
	private String menuLabel;//菜单label
	private String menuDeep;//菜单节点层次
	private String menuParentId;//菜单父节点
	private String menuOrder;//菜单节点顺序
	private String menuType;//菜单类型
	private String menuPrivilege;//菜单操作权
	private String menuSerialNo;//菜单序号
	private String menuStatus;//菜单状态
	private String menuLevel;//菜单使用级别
	private String menuBranchId;//菜单使用机构
	private String menuName;//菜单name
	private String menuDesc;//菜单描述	
	private String menuIdShow;//菜单真实id
	private String extraClass;//表树特定css，表树组件需要
	private String imgUrl;//表树图标url	
	private String itemStatus;//功能结点状态
	private String itemUrl;//功能结点url
	private String itemType;//功能节点类型
	private String itemLevel;//功能节点使用级别
	private String itemBranchid;//功能结点使用机构
	private String itemName;//功能name
	private String itemDescription;//功能描述
	
	public String getItemStatus() {
		return itemStatus;
	}
	public void setItemStatus(String itemStatus) {
		this.itemStatus = itemStatus;
	}
	public String getItemUrl() {
		return itemUrl;
	}
	public void setItemUrl(String itemUrl) {
		this.itemUrl = itemUrl;
	}
	public String getItemType() {
		return itemType;
	}
	public void setItemType(String itemType) {
		this.itemType = itemType;
	}
	public String getItemLevel() {
		return itemLevel;
	}
	public void setItemLevel(String itemLevel) {
		this.itemLevel = itemLevel;
	}
	public String getItemBranchid() {
		return itemBranchid;
	}
	public void setItemBranchid(String itemBranchid) {
		this.itemBranchid = itemBranchid;
	}
	public String getItemName() {
		return itemName;
	}
	public void setItemName(String itemName) {
		this.itemName = itemName;
	}
	public String getItemDescription() {
		return itemDescription;
	}
	public void setItemDescription(String itemDescription) {
		this.itemDescription = itemDescription;
	}
	public String getImgUrl() {
		if(menuId.startsWith("I")){//功能结点采用不同图标，表树组件需要，bean中不应该处理业务逻辑，这部分有待转移
			imgUrl = "images/menu/icon_fn.gif";						
		}else{
			imgUrl = "images/menu/icon_open.gif";
		}		
		return imgUrl;
	}
	public String getMenuStatus() {
		return menuStatus;
	}
	public void setMenuStatus(String menuStatus) {
		this.menuStatus = menuStatus;
	}
	public String getMenuLevel() {
		return menuLevel;
	}
	public void setMenuLevel(String menuLevel) {
		this.menuLevel = menuLevel;
	}
	public String getMenuBranchId() {
		return menuBranchId;
	}
	public void setMenuBranchId(String menuBranchId) {
		this.menuBranchId = menuBranchId;
	}
	public String getMenuName() {
		return menuName;
	} 
	public void setMenuName(String menuName) {
		this.menuName = menuName;
	}
	public String getMenuDesc() {
		return menuDesc;
	}
	public void setMenuDesc(String menuDesc) {
		this.menuDesc = menuDesc;
	}

	
	public String getExtraClass() {
		extraClass = menuId.startsWith("I")||menuParentId == null?"noDrag":"";//功能节点和根节点不允许拖动，表树组件需要，bean中不应该处理业务逻辑，这部分有待转移
		return extraClass;
	}
	public String getMenuIdShow() {//还原真实id，表树组件需要，bean中不应该处理业务逻辑，这部分有待转移
		int index = menuId.lastIndexOf('_');
		menuIdShow = index > 0 ?  menuId.substring(0, index):menuId;
		return menuIdShow;
	}
	public String getMenuPos() {
		return menuPos;
	}
	public void setMenuPos(String menuPos) {
		this.menuPos = menuPos;
	}
	public String getMenuId() { 
		return menuId;
	}
	public void setMenuId(String menuId) {
		this.menuId = menuId;
	}
	public String getMenuLabel() {
		return menuLabel;
	}
	public void setMenuLabel(String menuLabel) {
		this.menuLabel = menuLabel;
	}
	public String getMenuDeep() {
		return menuDeep;
	}
	public void setMenuDeep(String menuDeep) {
		this.menuDeep = menuDeep;
	}
	public String getMenuParentId() {
		return menuParentId;
	}
	public void setMenuParentId(String menuParentId) {
		this.menuParentId = menuParentId;
	}
	public String getMenuOrder() {
		return menuOrder;
	}
	public void setMenuOrder(String menuOrder) {
		this.menuOrder = menuOrder;
	}
	public String getMenuType() {
		return menuType;
	}
	public void setMenuType(String menuType) {
		this.menuType = menuType;
	}
	public String getMenuPrivilege() {
		return menuPrivilege;
	}
	public void setMenuPrivilege(String menuPrivilege) {
		this.menuPrivilege = menuPrivilege;
	}
	public String getMenuSerialNo() {
		return menuSerialNo;
	}
	public void setMenuSerialNo(String menuSerialNo) {
		this.menuSerialNo = menuSerialNo;
	}
	
	@Override
	public String toString(){
		StringBuilder sb = new StringBuilder();
		sb.append("menuPos=");
		sb.append(menuPos);
		sb.append(" menuId=");
		sb.append(menuId);
		sb.append(" menuLabel=");
		sb.append(menuLabel);
		sb.append(" menuDeep=");
		sb.append(menuDeep);
		sb.append(" menuParentId=");
		sb.append(menuParentId);
		sb.append(" menuOrder=");
		sb.append(menuOrder);
		sb.append(" menuType=");
		sb.append(menuType);
		sb.append(" menuPrivilege=");
		sb.append(menuPrivilege);
		sb.append(" menuSerialNo=");
		sb.append(menuSerialNo);
		sb.append(" menuStatus=");
		sb.append(menuStatus);
		sb.append(" menuLevel=");
		sb.append(menuLevel);
		sb.append(" menuBranchId=");
		sb.append(menuBranchId);
		sb.append(" menuName=");
		sb.append(menuName);
		sb.append(" menuDesc=");
		sb.append(menuDesc);
		sb.append(" menuIdShow=");
		sb.append(menuIdShow);
		sb.append(" extraClass=");
		sb.append(extraClass);
		sb.append(" imgUrl=");
		sb.append(imgUrl);
		sb.append(" itemStatus=");
		sb.append(itemStatus);
		sb.append(" itemUrl=");
		sb.append(itemUrl);
		sb.append(" itemType=");
		sb.append(itemType);
		sb.append(" itemLevel=");
		sb.append(itemLevel);
		sb.append(" itemBranchid=");
		sb.append(itemBranchid);
		sb.append(" itemName=");
		sb.append(itemName);
		sb.append(" itemDescription=");
		sb.append(itemDescription);
		return sb.toString();
	}
	
	
	
}
